<template>
    <view style="width:100%;height: 100%;">
        <iframe   style="width: 100%; height: 100vh; border: 0"   frameborder="0" :src="previewUrl"></iframe>
    </view>
</template>
<script setup>
import { inject } from 'vue';

const route = useRoute();
const { proxy } = getCurrentInstance();
const host = inject('host');
const previewUrl = ref('')
const testSrc = "http://viewer.apisev.cn/viewer/preview/remote?url=http://150.158.135.236:8888/down/HviIDqA6LWkt.md";
// proxy.$modal.showLoading('加载中')
(() => {
  const id = route.params && route.params.id;
  console.log(id)
  previewUrl.value = host + '/viewer/preview/'+id
  console.log(previewUrl.value)
//   request({
//     url:'/ex/book/'+id,
//     method:'get'
//   }).then(res=>{
//     console.log(res)
//     let source = res.source;
//     testSrc.value = "http://viewer.apisev.cn/viewer/preview/remote?url=" + source
//   })
})();
</script>
<style>
</style>